home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / librw / RWSlistCollectables.z / RWSlistCollectables
Encoding:
Text File  |  1998-10-30  |  15.9 KB  |  397 lines

  1.  
  2.  
  3.  
  4. RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))                            RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))
  5.  
  6.  
  7.  
  8. NNNNaaaammmmeeee
  9.      RWSlistCollectables - Rogue Wave library class
  10.  
  11. SSSSyyyynnnnooooppppssssiiiissss
  12.               // Smalltalk typedef:
  13.  
  14.  
  15.  
  16.               typedef RWSlistCollectables LinkedList ;
  17.           #include <rw/slistcol.h>
  18.           RWSlistCollectables a;
  19.  
  20.  
  21.  
  22.  
  23. DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  24.      Class RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss represents a group of ordered elements, without
  25.      keyed access.  Duplicates are allowed.  The ordering of elements is
  26.      determined externally, by the order of insertion and removal.  An object
  27.      stored by RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss must inherit abstract base class
  28.      RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee.  The virtual function iiiissssEEEEqqqquuuuaaaallll(((()))) (see class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee)
  29.      is required to find a match between a target and an item in the
  30.      collection Class RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss is implemented as a singly-linked
  31.      list, which allows for efficient insertion and removal, but efficient
  32.      movement in only one direction.  This class corresponds to the Smalltalk
  33.      class LLLLiiiinnnnkkkkeeeeddddLLLLiiiisssstttt.
  34.  
  35. PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
  36.      Polymorphic
  37.  
  38. PPPPuuuubbbblllliiiicccc CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrrssss
  39.               RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss();
  40.  
  41.  
  42.      Constructs an empty linked list.
  43.  
  44.               RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss(RWCollectable* a);
  45.  
  46.  
  47.      Constructs a linked list with single item aaaa.
  48.  
  49. PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr OOOOppppeeeerrrraaaattttoooorrrrssss
  50.               RWBoolean
  51.           ooooppppeeeerrrraaaattttoooorrrr========(const RWSlistCollectables& s) const;
  52.  
  53.  
  54.      Returns TTTTRRRRUUUUEEEE if self and ssss have the same number of members and if for
  55.      every item in self, the corresponding item at the same index in ssss iiiissssEEEEqqqquuuuaaaallll
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))                            RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))
  71.  
  72.  
  73.  
  74.      to it.
  75.  
  76. PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss
  77.               virtual RWCollectable*
  78.           aaaappppppppeeeennnndddd(RWCollectable*);
  79.  
  80.  
  81.      Redefined from RRRRWWWWSSSSeeeeqqqquuuueeeennnncccceeeeaaaabbbblllleeee.  Inserts the item at the end of the
  82.      collection and returns it.  Returns nnnniiiillll if the insertion was
  83.      unsuccessful.
  84.  
  85.               virtual void
  86.           aaaappppppppllllyyyy(RWapplyCollectable ap, void*);
  87.  
  88.  
  89.      Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.  This function has been redefined to
  90.      apply the user-defined function pointed to by aaaapppp to each member of the
  91.      collection, in order, from first to last.
  92.  
  93.               virtual RWCollectable*&
  94.           aaaatttt(size_t i);
  95.           virtual const RWCollectable*
  96.           aaaatttt(size_t i) const;
  97.  
  98.  
  99.      Redefined from class RRRRWWWWSSSSeeeeqqqquuuueeeennnncccceeeeaaaabbbblllleeee.  The index iiii must be between 0 and
  100.      the number of items in the collection less one, or an exception of type
  101.      RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr will be thrown.  Note that for a linked list, these functions
  102.      must traverse all the links, making them not particularly efficient.
  103.  
  104.               virtual RWspace
  105.           bbbbiiiinnnnaaaarrrryyyySSSSttttoooorrrreeeeSSSSiiiizzzzeeee() const;
  106.  
  107.  
  108.      Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
  109.  
  110.               virtual void
  111.           cccclllleeeeaaaarrrr();
  112.  
  113.  
  114.      Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
  115.  
  116.               virtual void
  117.           cccclllleeeeaaaarrrrAAAAnnnnddddDDDDeeeessssttttrrrrooooyyyy();
  118.  
  119.  
  120.      Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
  121.  
  122.               virtual int
  123.           ccccoooommmmppppaaaarrrreeeeTTTToooo(const RWCollectable* a) const;
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))                            RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))
  137.  
  138.  
  139.  
  140.      Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee.
  141.  
  142.               virtual RWBoolean
  143.           ccccoooonnnnttttaaaaiiiinnnnssss(const RWCollectable* target) const;
  144.  
  145.  
  146.      Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
  147.  
  148.               RWBoolean
  149.           ccccoooonnnnttttaaaaiiiinnnnssssRRRReeeeffffeeeerrrreeeennnncccceeee(const RWCollectable* e) const;
  150.  
  151.  
  152.      Returns true if the list contains an item that iiiissss iiiiddddeeeennnnttttiiiiccccaaaallll ttttoooo the item
  153.      pointed to by eeee (that is, that has the address eeee).
  154.  
  155.               virtual size_t
  156.           eeeennnnttttrrrriiiieeeessss() const;
  157.  
  158.  
  159.      Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
  160.  
  161.               virtual RWCollectable*
  162.           ffffiiiinnnndddd(const RWCollectable* target) const;
  163.  
  164.  
  165.      Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.  The first item that matches ttttaaaarrrrggggeeeetttt is
  166.      returned, or nnnniiiillll if no item was found.
  167.  
  168.               RWCollectable*
  169.           ffffiiiinnnnddddRRRReeeeffffeeeerrrreeeennnncccceeee(const RWCollectable* e) const;
  170.  
  171.  
  172.      Returns the first item that iiiissss iiiiddddeeeennnnttttiiiiccccaaaallll ttttoooo the item pointed to by eeee
  173.      (that is, that has the address eeee), or nnnniiiillll if none is found.
  174.  
  175.               virtual RWCollectable*
  176.           ffffiiiirrrrsssstttt() const;
  177.  
  178.  
  179.      Redefined from class RRRRWWWWSSSSeeeeqqqquuuueeeennnncccceeeeaaaabbbblllleeee.  Returns the item at the beginning
  180.      of the list.
  181.  
  182.               RWCollectable*
  183.           ggggeeeetttt();
  184.  
  185.  
  186.      Returns and rrrreeeemmmmoooovvvveeeessss the item at the beginning of the list.
  187.  
  188.               virtual unsigned
  189.           hhhhaaaasssshhhh() const;
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))                            RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))
  203.  
  204.  
  205.  
  206.      Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee.
  207.  
  208.               virtual size_t
  209.           iiiinnnnddddeeeexxxx(const RWCollectable* c) const;
  210.  
  211.  
  212.      Redefined from class RRRRWWWWSSSSeeeeqqqquuuueeeennnncccceeeeaaaabbbblllleeee.  Returns the index of the first item
  213.      that iiiissssEEEEqqqquuuuaaaallll to the item pointed to by cccc.  If there is no such item,
  214.      returns RRRRWWWW____NNNNPPPPOOOOSSSS.
  215.  
  216.               virtual RWCollectable*
  217.           iiiinnnnsssseeeerrrrtttt(RWCollectable* c);
  218.  
  219.  
  220.      Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.  Adds the item to the end of the
  221.      collection and returns it.  Returns nnnniiiillll if the insertion was
  222.      unsuccessful.
  223.  
  224.               void
  225.           iiiinnnnsssseeeerrrrttttAAAAtttt(size_t indx, RWCollectable* e);
  226.  
  227.  
  228.      Redefined from class RRRRWWWWSSSSeeeeqqqquuuueeeennnncccceeeeaaaabbbblllleeee.  Adds a new item to the collection
  229.      at position iiiinnnnddddxxxx.  The item previously at position iiii is moved to iiii++++1111,
  230.      eeeettttcccc.  The index iiiinnnnddddxxxx must be between 0 and the number of items in the
  231.      collection, or an exception of type RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr will be thrown.
  232.  
  233.               virtual RWClassID
  234.           iiiissssAAAA() const;
  235.  
  236.  
  237.      Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee to return ________RRRRWWWWSSSSLLLLIIIISSSSTTTTCCCCOOOOLLLLLLLLEEEECCCCTTTTAAAABBBBLLLLEEEESSSS.
  238.  
  239.               virtual RWBoolean
  240.           iiiissssEEEEmmmmppppttttyyyy() const;
  241.  
  242.  
  243.      Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
  244.  
  245.               virtual RWCollectable*
  246.           llllaaaasssstttt() const;
  247.  
  248.  
  249.      Redefined from class RRRRWWWWSSSSeeeeqqqquuuueeeennnncccceeeeaaaabbbblllleeee.  Returns the value at the end of the
  250.      collection.
  251.  
  252.               virtual size_t
  253.           ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffff(const RWCollectable* target) const;
  254.  
  255.  
  256.      Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.  Returns the number of items that
  257.      iiiissssEEEEqqqquuuuaaaallll to the item pointed to by ttttaaaarrrrggggeeeetttt.
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))                            RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))
  269.  
  270.  
  271.  
  272.               size_t
  273.           ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffffRRRReeeeffffeeeerrrreeeennnncccceeee(const RWCollectable* e) const;
  274.  
  275.  
  276.      Returns the number of items that aaaarrrreeee iiiiddddeeeennnnttttiiiiccccaaaallll ttttoooo the item pointed to by
  277.      eeee (that is, that have the address eeee).
  278.  
  279.               virtual RWCollectable*
  280.           pppprrrreeeeppppeeeennnndddd(RWCollectable*);
  281.  
  282.  
  283.      Redefined from class RRRRWWWWSSSSeeeeqqqquuuueeeennnncccceeeeaaaabbbblllleeee.  Adds the item to the beginning of
  284.      the collection and returns it.  Returns nnnniiiillll if the insertion was
  285.      unsuccessful.
  286.  
  287.               virtual RWCollectable*
  288.           rrrreeeemmmmoooovvvveeee(const RWCollectable* target);
  289.  
  290.  
  291.      Redefined from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.  Removes and returns the first item
  292.      that iiiissssEEEEqqqquuuuaaaallll to the item pointed to by ttttaaaarrrrggggeeeetttt.  Returns nnnniiiillll if there is
  293.      no such item.
  294.  
  295.               virtual void
  296.           rrrreeeemmmmoooovvvveeeeAAAAnnnnddddDDDDeeeessssttttrrrrooooyyyy(const RWCollectable* target);
  297.  
  298.  
  299.      Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
  300.  
  301.               RWCollectable*
  302.           rrrreeeemmmmoooovvvveeeeRRRReeeeffffeeeerrrreeeennnncccceeee(const RWCollectable* e);
  303.  
  304.  
  305.      Removes and returns the first item that iiiissss iiiiddddeeeennnnttttiiiiccccaaaallll ttttoooo the item pointed
  306.      to by eeee (that is, that has the address eeee).  Returns nnnniiiillll if there is no
  307.      such item.
  308.  
  309.               virtual void
  310.           rrrreeeessssttttoooorrrreeeeGGGGuuuuttttssss(RWvistream&);
  311.           virtual void
  312.           rrrreeeessssttttoooorrrreeeeGGGGuuuuttttssss(RWFile&);
  313.           virtual void
  314.           ssssaaaavvvveeeeGGGGuuuuttttssss(RWvostream&) const;
  315.           virtual void
  316.           ssssaaaavvvveeeeGGGGuuuuttttssss(RWFile&) const;
  317.  
  318.  
  319.      Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn.
  320.  
  321.               RWStringID
  322.           ssssttttrrrriiiinnnnggggIIIIDDDD();
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))                            RRRRWWWWSSSSlllliiiissssttttCCCCoooolllllllleeeeccccttttaaaabbbblllleeeessss((((3333CCCC++++++++))))
  335.  
  336.  
  337.  
  338.      (acts virtual) Inherited from class RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee.
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.